<template>
	<view class="p-2">
		<!-- <u-navbar :title="navTitle" placeholder autoBack></u-navbar> -->
		<u-parse :content="content"></u-parse>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:'',
				type:'',
				navTitle:''
				
			}
		},
		onLoad(e) {
			this.type = e.type
			this.navTitle = e.type === 'user'?'用户协议':'隐私政策'
			this.getData()
			
		},
		methods: {
			getData(){
				this.$api.agreement().then(res=>{
					if(res.code === 1){
						this.content = this.type === 'user'?res.data.user:res.data.privacy
					}
				})
			}
		}
	}
</script>

<style>

</style>
